package com.yupi.cli.pattern;

/**
 * 命令模式中的设备
 */
public class Device {
    /**
     * 设备名称
     */
    private String name;

    Device(String name){
        this.name = name;
    }

    /**
     * 打开设备
     */
    public void turnOn(){
        System.out.println(name + " is turning on!");
    }

    /**
     * 关闭设备
     */
    public void turnOff(){
        System.out.println(name + " is turning off!");
    }
}
